package com.qing.staticDemo;

public class StaticMain {
    static {
        System.out.println("静态代码块");
    }

    public StaticMain() {
        System.out.println("构造方法代码块");
    }

    {
        System.out.println("匿名代码块");
    }

    public static void main(String[] args) {
        StaticMain staticMain = new StaticMain();
        /**
         * 输出
         * 静态代码块
         * 匿名代码块
         * 构造方法代码块
         */
        System.out.println("----------------------");
        StaticMain staticMain1 = new StaticMain();
        /**
         * 输出
         * 匿名代码块
         * 构造方法代码块
         */
        System.out.println(Math.random());
    }
}
